import 'package:flutter/material.dart';
import 'package:lai_zhan/common/style/AppStyle.dart';
import 'package:lai_zhan/common/config/Config.dart';
import 'package:lai_zhan/common/model/shopResult/shop_result.dart';
import 'package:lai_zhan/common/util/NavigatorUtil.dart';


class ShopItem extends StatelessWidget {

  ShopResult shop;


  ShopItem({this.shop});

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return new GestureDetector(
      child: new Column(
        children: <Widget>[
          new SubShopItem(),
        ],),
      onTap: (){
        NavigatorUtil.goShopPage(context);
      },
    );
  }
}

class SubShopItem extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return new Container(width: AppSize.ScreenWidth,
      //height: AppSize.getRealHeight(100),
      color: Color(AppColors.lightWhite),
      child: new Row(
        children: <Widget>[
          new Container(
            margin: EdgeInsets.only(left: 15,right: 10,),
            child: FadeInImage.assetNetwork(placeholder: Config.DEFALUT_SHOP_IMAGE,
              image: "",width: AppSize.shopImageWidth, height: AppSize.shopImageHeight,),
          ),
          new Column( crossAxisAlignment: CrossAxisAlignment.start,
            children: <Widget>[
              new Text('海曙区门店',style: TextStyle(
                  fontWeight: FontWeight.bold,fontSize: AppSize.getRealSp(20)),),
              new Padding(padding: EdgeInsets.only(left: 10),
                child: new Column(
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: <Widget>[
                    new Padding(padding: EdgeInsets.all(1)),
                    new Row(
                      crossAxisAlignment: CrossAxisAlignment.center,
                      children: <Widget>[
                        new Container(width: AppSize.getRealWidth(30),
                          child: new Text('电话',style: AppConstant.smallTextBold,),),
                        new Padding(padding: EdgeInsets.all(3)),
                        new Container(width: AppSize.getRealWidth(150),
                          child: new Text('17855833972',style: AppConstant.smallSubLightText,),)
                      ],),
                    new Padding(padding: EdgeInsets.all(1)),
                    new Row(
                      crossAxisAlignment: CrossAxisAlignment.start,
                      children: <Widget>[
                        new Container(width: AppSize.getRealWidth(30),
                          child: new Text('地点',style: AppConstant.smallTextBold,),),
                        new Padding(padding: EdgeInsets.all(3)),
                        new Container(width: AppSize.getRealWidth(150),
                          child: new Text('海曙区海曙区海曙区海曙区海曙区',style: AppConstant.smallSubLightText,),)
                      ],),
                    new Container(height: 1,),
                    new Row(
                      crossAxisAlignment: CrossAxisAlignment.center,
                      mainAxisAlignment: MainAxisAlignment.start,
                      children: <Widget>[
                        new Container(width: AppSize.getRealWidth(30),
                          child: new Icon(AppIcon.DIST,size: AppSize.getRealWidth(17),color: Colors.black,),),
                        new Padding(padding: EdgeInsets.all(3)),
                        new Text('100m',style: AppConstant.smallSubLightText,)
                      ],),
                  ],
                ),
              )
            ],)
        ],
      ),
    );
  }
}